#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
/*int main()
{
	int arr[10] = {0};
	int sum = 0;
	for (int i = 0;i < 10;i++)
	{
		scanf("%d",&arr[i]);
		sum +=arr[i];
	}
	double r = sum / 10;
	printf("%f", r);
	return 0;
}*/
int main()
{
	int arr1[] = { 0 };
	int arr2[] = { 0 };
	for (int i = 0;i < 5;i++)
	{
		scanf("%d",&arr1[i]);
		scanf("%d",&arr2[i]);
	}
	for (int i = 0;i < 5;i++)
	{
		int z = 0;
		z = arr1[i];
		arr1[i] = arr2[i];
		printf("%d %d",z,arr1[i]);
	}
	return 0;
}